﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CCMaintenance.aspx.cs"
    Inherits="WMS6.Web.Inventory.CCMaintenance" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>CCMaintenance</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" type="text/javascript"></script>

    <script src="../Js/calendar.js" type="text/javascript" charset="gb2312"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function() {
            initEditNewPage();
        }      
        
        
         function confirmMsg(code)
         {
            if(code == "C001")
            {
                if(confirm('<%=GetGlobalMsgResource("C001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else if(code == "C010")
            {
                if(confirm('<%=GetGlobalMsgResource("C010") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else if(code == "F5740_001")
            {
                if(confirm('<%=GetGlobalMsgResource("F5740_001") %>'))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
         } 
      
    </script>

</head>
<body>
    <form id="F5531" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblAllocateRule" runat="server" CssClass="label_header" 
                            Text="循环盘点维护" meta:resourcekey="lblAllocateRule"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnNew%>" Visible="false"
                            AccessKey="n" />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnSave%>" Visible="false"
                            AccessKey="s" />
                    </td>
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Enabled="False" OnClientClick="javascript:if(confirmMsg('C001')) return true; else return false;"  Text="<%$Resources:ButtonResource,btnDelete%>"
                            AccessKey="d" Visible="false" />
                    </td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                        meta:resourcekey="lblMsg"></asp:Label>
                </div>
                
                <div id="div_menu">
                    <div style="float: left; width: 8px;">
                        <div class="tabL" id="divL1"></div>
                    </div>
                    <div style="float:left;" class="tabLabelCont tabCur" onclick="setTab('one',1,2)" id="divM1">
                        <asp:Label ID="one1" CssClass="hover" runat="server" 
                            meta:resourcekey="one1">常规</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR" id="divR1"></div>
                    </div>
                    <div style="float: left; width: 8px;">
                        <div class="tabL_1" id="divL2"></div>
                    </div>
                    <div style="float:left;" class="tabLabelCont tabCur_1" onclick="setTab('one',2,2)" id="divM2">
                        <asp:Label ID="one2" CssClass="navigationlabel" runat="server" 
                            meta:resourcekey="one2">循环盘点明细</asp:Label></div>
                    <div style="float: left; margin-right: 2px;">
                        <div class="tabR_1" id="divR2"></div>
                    </div>
                </div>
                
                
                <div id="div_content">
                    <div id="con_one_1" style="display: block;">
                        <table width="540px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblReleaseID" runat="server" CssClass="label" Text="发放编号" 
                                        meta:resourcekey="lblReleaseID"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblReleaseDate" runat="server" CssClass="label" Text="发放时间" 
                                        meta:resourcekey="lblReleaseDate"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtReleaseID" runat="server" CssClass="textbox" 
                                        meta:resourcekey="txtReleaseID"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtReleaseDate" runat="server" CssClass="textbox" 
                                        meta:resourcekey="txtReleaseDate"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                    <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" 
                                        meta:resourcekey="lblStatus"></asp:Label>
                                </td>
                                <td width="180">
                                    <asp:Label ID="lblCreatedBy" runat="server" CssClass="label" Text="发放人" 
                                        meta:resourcekey="lblCreatedBy"></asp:Label>
                                </td>
                                <td width="180">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" 
                                        Enabled="False" meta:resourcekey="ddlStatus">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCreatedBy" runat="server" CssClass="textbox" 
                                        Enabled="False" meta:resourcekey="txtCreatedBy"></asp:TextBox>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                                <td width="180">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="con_one_2" style="display: none; overflow:hidden; overflow-x:auto;">
                        <table width="1150px" style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnAddDetail" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnAddDetail%>" OnClientClick="javascript:if(document.getElementById('hdnReleaseID').value == ''){if(confirmMsg('F5740_001')) return true; else return false;}"
                                                    OnClick="btnAddDetail_Click" meta:resourcekey="btnAddDetail" Visible="false" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnDeleteDetail" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDeleteDetail%>" OnClientClick="javascript:if(confirmMsg('C010')) return true; else return false;"
                                                    OnClick="btnDeleteDetail_Click"  Visible="false"
                                                    meta:resourcekey="btnDeleteDetail" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="height: 10px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div>
                                        <asp:GridView ID="gvCCTag" runat="server" AllowSorting="false" AutoGenerateColumns="False"
                                            DataKeyNames="TAGNO,SYSQTY,STATUS,REQUESTID,OWNERID,SKUID" AllowPaging="True"
                                            CssClass="gridview" Width="1150px" OnRowDataBound="gvCCTag_RowDataBound" oninit="gvCCTag_Init" 
                                            OnPageIndexChanging="gvCCTag_PageIndexChanging" 
                                            meta:resourcekey="gvCCTag">
                                            <FooterStyle CssClass="GridViewFooterStyle" />
                                            <RowStyle CssClass="GridViewRowStyle" />
                                            <HeaderStyle CssClass="GridViewHeaderStyle" />
                                            <PagerStyle CssClass="GridViewPageStyle" />
                                            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                            <Columns>
                                                <asp:BoundField HeaderText="序号" FooterText="序号" 
                                                    meta:resourcekey="BoundField">
                                                    <ItemStyle CssClass="GridViewRowWidth_50" />
                                                </asp:BoundField>
                                                <asp:TemplateField meta:resourcekey="TemplateField">
                                                    <HeaderTemplate>
                                                        <asp:CheckBox ID="CheckBox1" runat="server" 
                                                            onclick="selectAll(this,'gvCCTag');" meta:resourcekey="CheckBox1" />
                                                    </HeaderTemplate>
                                                    <ItemTemplate>
                                                        <asp:CheckBox ID="chbSelect" runat="server" 
                                                            meta:resourcekey="chbSelect" />
                                                    </ItemTemplate>
                                                    <FooterTemplate>
                                                        <asp:CheckBox ID="CheckBox2" runat="server" 
                                                            onclick="selectAll(this,'gvCCTag');" meta:resourcekey="CheckBox2" />
                                                    </FooterTemplate>
                                                    <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                    <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="标签号" FooterText="标签号" SortExpression="TAGNO" 
                                                    meta:resourcekey="TAGNO">
                                                    <ItemTemplate>
                                                        <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("TAGNO") %>' NavigateUrl='<%# FormatUrl("~/Inventory/CCMaintenanceDetail.aspx?ID={0}&tagNo={1}",Eval("RELEASEID").ToString(),Eval("TAGNO").ToString()) %>'
                                                            Target="_self" CssClass="hyperlink" meta:resourcekey="HyperLink1"></asp:HyperLink>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="OWNERID" HeaderText="货主代码" FooterText="货主代码" 
                                                    SortExpression="OWNERID" meta:resourcekey="OWNERID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="SKUID" HeaderText="货品代码" FooterText="货品代码" 
                                                    SortExpression="SKUID" meta:resourcekey="SKUID">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="LOC" HeaderText="货位" FooterText="货位" 
                                                    SortExpression="LOC" meta:resourcekey="LOC">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="LOT" HeaderText="批次号" FooterText="批次号" 
                                                    SortExpression="LOT" meta:resourcekey="LOT">
                                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="STATUSD" HeaderText="状态" FooterText="状态" 
                                                    SortExpression="STATUSD" meta:resourcekey="STATUSD">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="LPNID" HeaderText="LPN" FooterText="LPN" 
                                                    SortExpression="LPNID" meta:resourcekey="LPNID">
                                                    <ItemStyle CssClass="GridViewRowWidth_150" />
                                                </asp:BoundField>
                                                <asp:TemplateField FooterText="盘点数量" HeaderText="盘点数量" 
                                                    SortExpression="COUNTQTY" meta:resourcekey="COUNTQTY">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblCountQyt" runat="server" 
                                                            Text='<%# GetPreferenceDigit(Eval("COUNTQTY").ToString()) %>' 
                                                            meta:resourcekey="lblCountQyt"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:TemplateField FooterText="调整数量" HeaderText="调整数量" SortExpression="ADJQTY" 
                                                    meta:resourcekey="ADJQTY">
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblADJQty" runat="server" 
                                                            Text='<%# GetPreferenceDigit(Eval("ADJQTY").ToString()) %>' 
                                                            meta:resourcekey="lblADJQty"></asp:Label>
                                                    </ItemTemplate>
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="COUNTBY" HeaderText="盘点用户" FooterText="盘点用户" 
                                                    SortExpression="COUNTBY" meta:resourcekey="COUNTBY">
                                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                                </asp:BoundField>
                                            </Columns>
                                        </asp:GridView>
                                    </div>
                                </td>
                            </tr>
                            <tr style="height: 30px;">
                                <td>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <input type="hidden" id="hdnReleaseID" runat="server" />
                    <input id="hdnFrom" runat="server" type="hidden"/>
                        <input id="hdnFlag" runat="server" type="hidden"/>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
